package com.sparkseries.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * 用户通知信息类型
 * TODO 加入更多类型
 */
public enum UserNotifyTypeEnum {
    WARN(1,"警告"),
    INFO(2,"信息"),
    ERROR(3,"异常"),
    NOTIFY(4, "通知")
            ;
    private final Integer code;
    private final String type;

    UserNotifyTypeEnum(Integer code, String type) {
        this.code = code;
        this.type = type;
    }

    public static List<String> getAllType(){
        List<String> res = new ArrayList<>();
        for (UserNotifyTypeEnum Enum : UserNotifyTypeEnum.values()) {
            res.add(Enum.type);
        }
        return res;
    }
}
